package com.school.demo.model.auto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonView;
import com.github.dreamyoung.mprelation.JoinColumn;
import com.github.dreamyoung.mprelation.ManyToOne;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.OneToOne;

/**
 * <p>
 *
 * </p>
 *
 * @author Charlotte
 * @since 2021-04-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(resultMap = "")
public class Activities extends Model {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private Integer origanizationId;

    private String upTime;

    private Integer viewNum;

    private String content;

    private String label;

    private String title;

    private Integer status;

    private Integer isSetJoinNum;


    @TableField(exist = false)
    @ManyToOne
    @JoinColumn(name="origanization_id",referencedColumnName = "id")
    private Organization organization;//组织在查询之后重新添加

    /**
     * 活动图片
     */
    private String imgs;

    /**
     * 备用字段
     */
    @TableField("column_11")//貌似不能识别，需要指定
    private String column11;

    /**
     * 备用字段
     */
    @TableField("column_12")
    private String column12;

}
